package edu.hawaii.myisern.action;

import net.sourceforge.stripes.action.RedirectResolution;
import net.sourceforge.stripes.action.Resolution;

/**
 * Allows a user to log out.  This class was adapted from the Bugzooky example.
 * 
 * @author laura
 *
 */
public class LogoutActionBean extends MyIsernActionBean {
  /**
   * Logs the user out of the system.
   * 
   * @return A Resolution indicating to redisplay a proper page.
   * @throws Exception  If an exeption occurs.
   */
  public Resolution logout() throws Exception {
    getContext().getRequest().getSession().invalidate();
    return new RedirectResolution("/logout.jsp");
  }
}
